package com.guigu.abo.controllers;

import com.guigu.abo.pojo.ReSpeciality;
import com.guigu.abo.pojo.ReUserinfo;
import com.guigu.abo.service.ReSpecialityService;
import com.guigu.abo.service.ReUserinfoService;
import com.guigu.abo.service.impl.ReSpcialityServiceImpl;
import com.guigu.abo.service.impl.ReUserinfoServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserinfoControllers {

    @Autowired
    private ReUserinfoService reUserinfoService;
    @Autowired
    private ReSpecialityService reSpecialityService;

    @GetMapping("/userinfoAll")
    public ReUserinfo queryUserinfo() {
        ReUserinfo reUserinfo = reUserinfoService.selectAll();
        return reUserinfo;
    }

    @GetMapping("/respecialityAll")
    public List<ReSpeciality> queryRespcialitys(){
        List<ReSpeciality> reSpecialities = reSpecialityService.selectAll();
        return reSpecialities;
    }

}
